﻿@model IEnumerable<FMIS.Models.Player>

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Default.cshtml";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Person.PersonFirstName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Club.ClubName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.PlayerFirstName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.PlayerLastName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.PlayerFullName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Address)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.RegisteredIn)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Status)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.JerseySize)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.ShoeSize)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.JerseyNumber)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.NationalJerseyNo)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.FavoritePosition)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Leg)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.AgentId)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Comment)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Injuries)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.PublicComment)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.PlayerCode)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Person.PersonFirstName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Club.ClubName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.PlayerFirstName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.PlayerLastName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.PlayerFullName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Address)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.RegisteredIn)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Status)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.JerseySize)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ShoeSize)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.JerseyNumber)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.NationalJerseyNo)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.FavoritePosition)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Leg)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.AgentId)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Comment)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Injuries)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.PublicComment)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.PlayerCode)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.PlayerId }) |
            @Html.ActionLink("Details", "Details", new { id=item.PlayerId }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.PlayerId })
        </td>
    </tr>
}

</table>
